home *** CD-ROM | disk | FTP | other *** search
- nx - network explorer - copyright 2000 mike janzen
- version 0.01
- mikejanzen@hotmail.com
- mikej.mine.nu
-
- nx [options] <hostspec1,hostspec2,...>
- nx -p 1-1000,6667,65000- microsoft.com/24 # scan 8bit subnet
-
-
-
- [options]
-
- -d
-
- Print debugging info. Use more than once for greater effect.
-
- -heart
-
- This tries to make sure that the net is up while the scan is
- going on. It does this by pinging microsoft.com:80 and
- yahoo.com:80. If both of these are down, we assume that the net
- is down, and suspend scaning till it is back up (one heartbeat
- every 10 seconds).
-
- -hosts <number>
-
- The number of hosts to roundrobin at the same time.
- nx will gather <number> unique hosts from your host targets.
- It will then scan the first port from each of these hosts in
- succession. Then the second.. then the third...
- This is done to minimize the peak load on the remote networks.
- If you are doing scans across many hosts, make this number higher.
- Default: 1000.
-
- -o <outputfile>
-
- Send output to the file. Note that progress output still goes
- to the screen (via cerr). This is by design.
-
- -p <portlist>
-
- Specify a list of ports to scan on each host.
- eg -p -30,40-1000,1433,6667,65000-
- Default: 21,23,25,53,79,80,110,119,137,143,443,1433,6667.
-
- -prand <portlist>
-
- Same as -p except it scans the ports in random order.
-
- -plug
-
- This uses plugins on a specific port. You can write a dll that
- nx hands off an open socket to. see the included Id_80.cpp for
- an example. Only one dll allowed per port. You specify which
- plugins you want loaded in the plugins.txt file. I will multi-
- thread this sometime.
-
- -socks <number>
-
- The number of connections (sockets) to be attempted in parallel.
- Default: 100.
-
- -timeout <seconds>
-
- Specify the timeout in seconds to wait for a tcp connection
- from the host.
- Default: 5 seconds.
-
- -interval <miliseconds>
-
- This the time quantum between consecutive connection attempts.
- Set to -1 for really fast networks and really small timeouts.
-
- -v
-
- Print verbose info. Use more than once for greater effect.
- Particularly, progress info is printed to the screen (only)
- if specified at least once.
-
- [hosts]
-
- There are 3 different ways nx can get hosts.
- 1) Directly from the commandline
- 2) From stdin (just put a dash on the end of the command line)
- 3) From an input file (via -i)
-
- hostspecs can include a subnet mask like microsoft.com/24.
- eg 1.2.3.4/24 scans the 256 machines of 1.2.3.*
-
- -i <inputfile>
-
- Get hostspecs from this file (one host per line)
-
- -
-
- Get hostspecs from stdin
-
-
- ======================================================================
-
-
- REMARKS
-
-
- To maximize performance, adjust the following settings:
-
- -interval quantum of time between consecutive connection attempts
- -timeout seconds before a connect attempt fails
- -socks number of concurrent connection attempts
-
- Use the following settings
- On ~150k/sec bandwidth and ~100ms latency (cable)
- -interval 10
- -socks 250
- -timeout 5
-
- Now, the -interval is determined by your bandwidth.
- You don't want too many collisions on your network.
-
- Lets say your available bandwidth is 150k/sec.
- Then you can push out (150k/sec)/(1.5k/pkt) == 100 pkt/sec
- This means the interval needs to be 1/100 sec/pkt == 10ms/pkt.
- -interval 10 (the default)
-
-
- Now set the -timeout this is determined by your latency.
- For internet the default timeout of 5 seconds seems to work good.
- For localnet you can drop this a lot (maybe to .3 or less).
- For localmachine it can be even lower.
- -timeout 5 (the default)
-
- The -interval and -timeout together determine -socks.
- Set -socks such that it takes ~1/2 the -timeout time to fill
- them all up. For -timeout 5, 1/2 of the time is 2.5 seconds.
- 100pkt/sec * 2.5 sec == 250 pkt == 250 socks.
- -socks 250 (the default)
-
-
- ======================================================================
-
-
- PLUGINS
-
-
- Plugins allow you to define what happens when nx finds an open port.
- The sample Id_80.cpp returns the name of the http server to nx.
- Run compile_plugin.bat to compile it.
- You need winsock2 (ws2_32.lib) to compile.
- (look at the source for further explanation)
-
- You tell nx which plugin dlls to load by using the plugins.txt file.
- (look there for further explanation)
-
- If you want to send me your plugins, email mikejanzen@hotmail.com
- and I will put them up on the site mikej.mine.nu.
- Include only the single source file.
-
-
- =======================================================================
-
- Fastest clocked speed: >1000 ports/sec!
-
- Machine: celeron400
- Network: 10megabit
-
- Here's the run:
-
- F:\Projects\Portscan\Release>nx -p 1-20000 -hosts 2 -timeout .001 -socks 30 -int
- erval -1 ninja sky
- Host ninja Resolves to 10.0.0.21
- Host sky Resolves to 10.0.0.17
- Open 10.0.0.21 13 -120ms Daytime (RFC 867)
- Open 10.0.0.21 9 -120ms Discard
- Open 10.0.0.21 7 -120ms Echo
- Open 10.0.0.21 17 10ms Quote of the Day
- Open 10.0.0.21 19 0ms Character Generator
- Open 10.0.0.21 42 -10ms Host Name Server
- Open 10.0.0.17 80 -10ms World Wide Web HTTP
- Open 10.0.0.17 135 0ms DCE endpoint resolution
- Open 10.0.0.21 135 0ms DCE endpoint resolution
- Open 10.0.0.17 139 0ms NETBIOS Session Service
- Open 10.0.0.21 139 0ms NETBIOS Session Service
- Open 10.0.0.17 443 -10ms http protocol over TLS/SSL
- Open 10.0.0.21 445 0ms Microsoft-DS
- Open 10.0.0.21 515 -10ms spooler
- Open 10.0.0.21 1028 -10ms
- Open 10.0.0.21 1027 -10ms
- Open 10.0.0.21 1037 -10ms
- Open 10.0.0.21 1038 10ms
- Open 10.0.0.21 1039 0ms
- Open 10.0.0.21 1433 0ms Microsoft-SQL-Server
- Open 10.0.0.21 7007 0ms
- Open 10.0.0.21 7778 0ms
- Finished (no more sockets to process)
- Stats 1000.33 ports/sec, 39 sec, 22 open, 0 closed, 39978 timeouts
-
-
-